import request from '@/utils/request2'
// 获取流程列表
export function queryList(data, page, size) {
  return request({
    url: `/leave/showActFlow`,
    method: 'POST',
    data: { 'processName': data.name, 'lngproductid': 'CE', 'page': page, 'size': size }
  })
}
// 删除
export function del(id) {
  return request({
    url: `/leave/delDeployFlow?processID=${id}`,
    method: 'POST'
  })
}
// 我的任务
export function myTaskList(data, page, size) {
  return request({
    url: `/leave/showFlowTaskList`,
    method: 'POST',
    data: { 'lngOperatorID': data.lngOperatorID, 'page': page, 'size': size }
  })
}
// 办理

export function solve(data) {
  return request({
    url: `/leave/agent/completeFlow`,
    method: 'POST',
    data
  })
}

// 详情
export function showDetail(id) {
  return request({
    url: `/leave/showDetail?strprocessId=${id}`,
    method: 'POST'
  })
}
//
export function changeState() {

}

// /leave/getWorkFlowTemplate

export function getTemplate() {
  return request({
    url: `/leave/getWorkFlowTemplate`,
    method: 'GET'
  })
}

// 获取流程图

export function getImages(deploymentId, resourceName) {
  return request({
    url: `/leave/imageById?deploymentId=${deploymentId}&resourceName=${resourceName}`,
    method: 'POST'
  })
}
